
<!-- <div class="card" v-for="cardItem in items.doctorList" :key="cardItem.id" @click="handleLookQRCode(items)">
  <div class="left-head"><img :src="cardItem.logo" /></div>
  <div class="right-content">
    <div class="docName">{{ cardItem.docName }}</div>
    <div class="label" v-if="cardItem.label">
      <div class="tags" v-for="(tags, ind) in cardItem.label.slice(0, 2)" :key="ind">
        {{ tags }}</div>
      <span v-if="cardItem.label.length > 2">...</span>
    </div>
    <div class="label" v-else></div>
    <div class="skill" v-if="cardItem.skill">
      <span>专家擅长：</span>{{ cardItem.skill.slice(0, 48) }} <span v-if="cardItem.skill.length > 47">...</span>
    </div>
    <div class="skill" v-else>
      <span>专家擅长：</span>
    </div>
  </div>
</div> -->
<template>
  <div>
    <div class="card" v-for="cardItems in cardItem" :key="cardItems.id" @click="handleDoctorInfo(cardItems)">
      <div class="left-head">
        <!-- <img v-if="cardItems.logo" :src="cardItems.logo" /> -->
        <img v-if="cardItems.logo" v-lazy="cardItems.logo" />
        <img v-else src="../../assets/doc_icon.png" />
      </div>
      <div class="right-content">
        <div class="docName">{{ cardItems.docName }}<span>{{ cardItems.jobTitle }}</span></div>
        <div class="label" v-if="cardItems.label">
          <div class="tags" v-for="(tags, ind) in cardItems.label.slice(0, 3)" :key="ind">
            {{ tags }}</div>
          <span v-if="cardItems.label.length > 3">...</span>
        </div>
        <div class="label" v-else></div>
        <div class="skill" v-if="cardItems.skill">
          <span>专家擅长：</span>{{ cardItems.skill.slice(0, 48) }} <span v-if="cardItems.skill.length > 47">...</span>
        </div>
        <div class="skill" v-else>
          <span>专家擅长：</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'

export default {
  props: {
    cardItem: {
      // type: Array,
    },
    hosId: {
      type: Number,
    },
    secondDepartmentId: {
      type: Number,
    },
    hosName: {
      type: String,
    },
    hosLogo: {
      type: String,
    },
    departmentName: {
      type: String,
    }
  },
  data() {
    return {
      hospitalIndex: 0,
      activeIndex: 0,
      dataSource: [],
    }
  },
  created() {
  },
  methods: {
    handleCLoseRQCode() {
    },

    handleDoctorInfo(item) {
      this.$router.push({ name: 'doctorInfo', query: { hosId: this.hosId, secondDepartmentId: this.secondDepartmentId, doctorId: item.id, hosName: this.hosName, hosLogo: this.hosLogo, departmentName: this.departmentName, bustUrl: item.bustUrl } })
    },


  }
};
</script>
<style scoped>
.mark-content {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgb(0, 0, 0, 0.5);
}
.QRCOde {
  width: 280px;
  height: 275px;
  background: #fff;
  margin: 400px auto 0;
  border-radius: 10px;
}
.close {
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  margin-left: 250px;
  cursor: pointer;
}
.RQCode-img {
  width: 170px;
  height: 170px;
  margin: 0 auto;
  background: #e2e2e2;
}
.reservation {
  text-align: center;
  margin: 10px 0 0;
}
.doctor-name {
  text-align: center;
  color: red;
}
.hospital-fixed {
  width: 150px;
  background: #fff;
  position: fixed;
  top: 40%;
  text-align: right;
  right: 10px;
  /* line-height: 35px; */
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
}
.hospital-fixed div {
  box-sizing: border-box;
  line-height: 15px;
  margin-bottom: 15px;
}
.hospital-fixed a {
  color: #323233;
}
#container {
  /* width: 1280px; */
  /* height: 500px; */
  margin: 0 auto;
  background: #fff;
}
.header-content {
  width: 100%;
  height: 80px;
  background-repeat: no-repeat;
  position: fixed;
  top: 0;
  background-color: #fff;
  padding: 15px;
}
.body-content {
  width: 1290px;
  /* height: 500px; */
  margin: 120px auto;
}
.hospital-list {
  margin-bottom: 50px;
}
.hospital-img-content {
  width: 330px;
  height: 60px;
  /* background-image: url("../assets/hospital-logo1.png"); */
  background-size: 100%;
  background-repeat: no-repeat;
  margin-bottom: 20px;
  font-size: 16px;
  overflow: hidden;
}
.hospital-img {
  float: left;
  margin-right: 10px;
}
.hospital-name {
  float: left;
  color: #323233;
  line-height: 70px;
  font-weight: bold;
}
.hospital-img-content img {
  width: 60px;
  height: 60px;
}
.department-content {
  overflow: hidden;
  border-bottom: 1px solid #dcdee0;
  padding-bottom: 20px;
}
.department-item {
  float: left;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  color: #323233;
  margin-right: 30px;
  box-sizing: border-box;
  margin-bottom: 10px;
  height: 30px;
  line-height: 30px;
}
.department-item a {
  color: #323233;
}
a.active {
  color: #1971ff;
}
.doctor-content {
  overflow: hidden;
}
.doctor-content h2 {
  color: #323233;
  margin-top: 30px;
}
.card {
  width: 420px;
  height: 150px;
  border-radius: 10px;
  background: #f7f8fa;
  margin: 0 10px 10px 0;
  float: left;
  overflow: hidden;
  cursor: pointer;
}
.left-head {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  margin: 12px 15px 20px;
  border: 1px solid #f8f7fb;
  overflow: hidden;
  background: #fff;
  float: left;
}
.left-head img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
}
.right-content {
  float: left;
  width: 325px;
}
.docName {
  margin: 12px 0 7px;
  font-size: 16px;
  color: #323233;
}
.docName span {
  font-size: 14px;
  color: #969799;
  padding-left: 10px;
}
.label {
  height: 25px;
  overflow: hidden;
  margin-bottom: 5px;
}
.tags {
  padding: 2px 3px;
  border-radius: 5px;
  background: #edf4ff;
  float: left;
  margin-right: 5px;
  color: #1971ff;
}
.skill {
  /* display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis; */
}
.skill span {
  color: #323233;
  font-weight: bold;
}
</style>
